package com.xiweicheng;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 17/4/25.
 */
@FeignClient(name = "stores", fallback = HystrixClientFallback.class)
public interface StoreClient {

    @RequestMapping("/")
    Object home();

    @RequestMapping(method = RequestMethod.GET, value = "/stores")
    RespBody getStores();

    @RequestMapping(method = RequestMethod.POST, value = "/stores/{storeId}", consumes = "application/json")
    RespBody getStore(@PathVariable("storeId") Long storeId);

}

